
import Login from './views/Login.vue'
import Gantt3 from './components/gantt/gantt3'          //  gantt 插件
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'

import projectCount from './views/proAng/projectCount'

// pro  项目管理
import proAdd from './views/proAng/projectAdd'  // 项目添加
import pro from './views/proAng/project.vue'            //  项目列表  // 所有项目
import projectIScomplete from './views/proAng/projectIScomplete'    // 完成项目
import projectNOcomplete from './views/proAng/projectNOcomplete'    // 未完成项目

// user  用户管理
import pwdUpd from './views/user/pwdUpd'               // 密码修改
import user from './views/user/user.vue'              // 用户列表
import allUserTimeCount from './views/user/allUserTimeCount'      // 所有人员工时统计

// count  统计管理
import proCount from './views/count/proCount'      // 项目统计
import timeCount from './views/count/timeCount'    // 工时统计

// bug  bug管理
import bugAdd from './views/bug/bugAdd'  // bug添加
import bugList from './views/bug/bugList'        // bug列表
import bugUpd from './views/bug/bugUpd'  // bug添加

// fault    故障管理
import causeFailurelAdd from './views/fault/causeFailurelAdd'   // 故障原因添加
import companyAdd from './views/fault/companyAdd'       // 公司添加
import equipmentModelAdd from './views/fault/equipmentModelAdd'        // 设备型号添加
import faultAdd from './views/fault/faultAdd'               // 故障添加
import faultList from './views/fault/faultList'         // 故障列表



// import ganttDemo from './components/gantt/ganttDemo'
// import flowChart from './components/charts/flowChart'
// import myFlow from './components/myFlow/flowChart'
// import posiStuList from './views/posAng/posiStuList'
// import posAddLog from './views/posAng/posAddLog'
// import posUpload from './views/posAng/posUpload'

// import Form from './views/proAng/Form.vue'
// import Page4 from './views/nav2/Page4.vue'
// import Page5 from './views/nav2/Page5.vue'
// import Page6 from './views/nav3/Page6.vue'
// import echarts from './views/charts/echarts.vue'
// permission  -1是所有用户都显示  0 只有管理员显示
let routes = [
    {
        path: '/Login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    // { path: '/main', component: Main },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '人员项目管理',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         { path: '/main', component: Main, name: '主页', hidden: true },
    //         { path: '/Gantt3', component: Gantt3, name: '人员项目' },
    //         { path: '/ganttDemo', component: ganttDemo, name: '人员项目2',hidden: true },
    //     ]
    // },

    // {
    //     path: '/',
    //     component: Home,
    //     name: '流程图管理',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         { path: '/charts', component: flowChart, name: '流程图'},
    //         { path: '/myFlow', component: myFlow, name: '流程图2'},
    //     ]
    // },

    {
        path: '/',
        component: Home,
        name: '用户管理',
        permission:'0',
        iconCls: '../static/img/user.png',
        children: [
            // { path: '/projectAdd', component: projectAdd, name: '用户添加',hidden: true,'admin':'no'},
            { path: '/user', component: user, name: '用户列表','admin':'no'},
            { path: '/allUserTimeCount', component: allUserTimeCount, name: '所有人员工时统计','admin':'admin'},
            { path: '/projectCount', component: projectCount, name: '用户所做项目',hidden: true},
            { path: '/pwdUpd', component: pwdUpd, name: '用户密码修改',hidden: true},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '统计管理',
        permission:'-1',
        iconCls: '../static/img/user.png',
        children: [
            { path: '/proCount', component: proCount, name: '项目统计','admin':'no'},

            { path: '/timeCount', component: timeCount, name: '工时统计','admin':'no'},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '项目管理',
        permission:'-1',
        iconCls: '../static/img/pro1.png',
        children: [
            { path: '/projectNO', component: projectNOcomplete, name: '未完成项目','admin':'no'},
            { path: '/projectIS', component: projectIScomplete, name: '已完成项目' ,'admin':'no'},
            { path: '/proAll', component: pro, name: '所有项目','admin':'no' },
            { path: '/proAdd', component: proAdd, name: '项目添加','admin':'no' },
            { path: '/Gantt3', component: Gantt3, name: '人员项目',hidden: true,'admin':'no' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Bug管理',
        permission:'-1',
        iconCls: '../static/img/pro1.png',
        children: [
            { path: '/bugList', component: bugList, name: 'Bug列表' },
            { path: '/bugAdd', component: bugAdd, name: 'Bug添加' },
            { path: '/bugUpd', component: bugUpd, name: 'Bug修改',hidden: true },

        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '设备故障管理',
    //     permission:'-1',
    //     iconCls: '../static/img/pro1.png',
    //     children: [
    //         { path: '/faultList', component: faultList, name: '故障列表' },
    //         { path: '/faultAdd', component: faultAdd, name: '故障添加' },
    //         { path: '/equipmentModelAdd', component: equipmentModelAdd, name: '设备型号添加'},
    //         { path: '/companyAdd', component: companyAdd, name: '公司添加'},
    //         { path: '/causeFailurelAdd', component: causeFailurelAdd, name: '故障原因添加'},
    //
    //     ]
    // },

    // {
    //     path: '/',
    //     component: Home,
    //     name: 'pos管理',
    //     iconCls: 'fa fa-bar-chart',
    //     children: [
    //         { path: '/posiStuList', component: posiStuList, name: '下载状态' },
    //         { path: '/posUpload', component: posUpload, name: 'pos远程升级' },
    //         { path: '/posAddLog', component: posiStuList, name: '添加上传文件的POSID'},
    //     ]
    // },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;